package main

import "fmt"

func main() {
	a:=10
	b:=5
	fmt.Println("a + b =",a+b)
	fmt.Println("a - b =",a-b)
	fmt.Println("a * b =",a*b)
	fmt.Println("a / b =",a/b)
	fmt.Println("a % b =",a%b)

	fmt.Println("a > b ?",a>b)
	fmt.Println("a < b ?",a<b)
	fmt.Println("a != b ?",a!=b)

	fmt.Println("true && true = ",true && true)
	fmt.Println("true && false = ",true && false)
	fmt.Println("true || true = ",true || true)
	fmt.Println("true || false = ",true || false)
	fmt.Println("false || false = ",false || false)
	c:= 3
	var e int = 5
	e |= c
	fmt.Println("3 |= 4", e)
	//  &=	按位与后赋值	C &= 2 等于 C = C & 2
	//  ^=	按位异或后赋值	C ^= 2 等于 C = C ^ 2
	//  |=	按位或后赋值	C |= 2 等于 C = C | 2
	// A = 0011 1100
	// B = 0000 1101
	//A|B = 0011 1101
	//A&B = 0000 1100
	//A^B = 0011 0001
}